import request from '@/utils/request'

// 查询楼栋信息列表
export function listFloor(query) {
  return request({
    url: '/property/floor/list',
    method: 'get',
    params: query
  })
}

// 查询楼栋信息详细
export function getFloor(id) {
  return request({
    url: '/property/floor/' + id,
    method: 'get'
  })
}

// 新增楼栋信息
export function addFloor(data) {
  return request({
    url: '/property/floor',
    method: 'post',
    data: data
  })
}

// 修改楼栋信息
export function updateFloor(data) {
  return request({
    url: '/property/floor',
    method: 'put',
    data: data
  })
}

// 删除楼栋信息
export function delFloor(id) {
  return request({
    url: '/property/floor/' + id,
    method: 'delete'
  })
}

// 导出楼栋信息
export function exportFloor(query) {
  return request({
    url: '/property/floor/export',
    method: 'get',
    params: query
  })
}

// 一键生成单元/楼层数据
export function generationUnitAndLayer(data) {
  return request({
    url: '/property/floor/generationUnitAndLayer',
    method: 'post',
    data: data
  })
}


// 新增楼栋数量
export function addFloorNum(data) {
  return request({
    url: '/property/floor/addFloorNum',
    method: 'post',
    data: data
  })
}
